import unittest
import requests
from config.readconfig import Read

# 实例化调用对象
dd=Read()

class MyTestCase(unittest.TestCase):
    def test_something(self):
        vlogip = dd.get_vlog('vlip')
        vltimeout = dd.get_vlog('timeout')

        # ip = dd.get_db('ip')
        # print(ip)
        # 发送请求
        vl = {"username":"sang","password": 123}
        vhead={"Content-Type":"application/x-www-form-urlencoded"}
        r = requests.post(vlogip+"/login",headers=vhead,data=vl,timeout=int(vltimeout))
        print(r.url)








if __name__ == '__main__':
    unittest.main()
